
import React, { Component } from 'react';
import { StyleSheet, NavigatorIOS, TabBarIOS } from 'react-native';
import SecondHomePageView from '../secondComponent/secondHomePageView';
import ReactNativeQRcode from '../secondComponent/reactNativeQrcode';

class SecondTabBarItem extends Component {
    _onRightButtonPress(){
        this.refs.nav.push({
            title: '二维码学习',
            passProps: { payCode:'18516726106' },
            component: ReactNativeQRcode
        });
    };

    render() {
        return (
            <NavigatorIOS
                ref='nav'
                style={styles.container}
                initialRoute={{
                     component: SecondHomePageView,
                     title: 'React-Native 布局',
                     passProps: { myProp: '传值用' },
                     rightButtonTitle:'二维码',
                     backButtonTitle:'返回',
                     onRightButtonPress:this._onRightButtonPress.bind(this)
                }}
            />
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1
    }
});

export default SecondTabBarItem;